package com.hd.ssm.service;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hd.ssm.entity.User;
import com.hd.ssm.mapper.UserMapper;

@Service("userService")
public class UserServiceImpl implements IUserService{
   
	@Autowired
	private UserMapper userMapper;
	
	public int checkUserExits(User user){
		return this.userMapper.checkUserExits(user);
	}
	
	public void saveUser(User user){
		this.userMapper.saveUser(user);
	}
	
	public void editUserById(User user) {		
		this.userMapper.editUserById(user);
	}
	
	public int delUserById(int userId) {
		return this.userMapper.delUserById(userId);
	}

	public User getUserByUid(int userId) {		
		return (User)this.userMapper.getUserByUid(userId);
	}

	public List<User> getUserList() {		
		return (List<User>)this.userMapper.getUserList();
	}	

}
